package com.example.anquan.controller;


import com.example.anquan.Service.ArticleService;
import com.example.anquan.Service.CommentService;
import com.example.anquan.guanli.Article;
import com.example.anquan.guanli.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class CommentController {
@Autowired
private ArticleService articleService;
@GetMapping("/comment/{id}")
public Article findComment(@PathVariable("id") Integer id){
        return articleService.findArticleById(id);
        }
//@GetMapping("/article/{id}/{content}")
//public Article updateComment(@PathVariable("id") Integer id,
//                             @PathVariable("content") String content){
//        return articleService.updateArticle(id, content);
//        }
//@GetMapping("/article/delete/{id}")
//public void deleteComment(@PathVariable("id") Integer id) {
//        articleService.deleteArticleById(id);
//        }
        }
